package com.codetile.batch.execution;

import com.codetile.batch.db.User;
import org.springframework.batch.core.SkipListener;
import org.springframework.stereotype.Component;

@Component
public class MySkipListener implements SkipListener<User,User> {
    @Override
    public void onSkipInRead(Throwable throwable) {
        System.out.println("发生异常"+throwable);
    }

    @Override
    public void onSkipInWrite(User user, Throwable throwable) {
        System.out.println(user.getName()+"发生异常"+throwable);
    }

    @Override
    public void onSkipInProcess(User user, Throwable throwable) {
        System.out.println(user.getName()+"发生异常"+throwable);
    }
}
